home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / assign manager / assignz / install-assignz < prev   
Text File  |  1996-04-07  |  10KB  |  433 lines

  1. ; $VER: Install-AssignZ 1.1 (18.02.95)
  2. ; Script to install AssignZ
  3. ; ©1993-95 Tobias Abt 
  4.  
  5. (set #AssignZName
  6. (cat "AssignZ"
  7. ))
  8.  
  9. ;=============================================================================
  10. ; English strings
  11.  
  12. (if (= @language "english")
  13. (
  14.  
  15. (set #Bad-Kick
  16. (cat "\n\nYou need Kick/WB 2.04 or better for AssignZ!"
  17. ))
  18.  
  19. (set #Message
  20. (cat "\n\nWelcome to AssignZ!\n"
  21.      "You are about to install a very powerful Utility for your convenience using the Amiga."
  22. ))
  23.  
  24. (set #Path-Manually
  25. (cat "Select path manually"
  26. ))
  27.  
  28. (set #Yes
  29. (cat "Yes"
  30. ))
  31.  
  32. (set #No
  33. (cat "No"
  34. ))
  35.  
  36. ;AssignZ
  37. (set #Ask-AssignZ
  38. (cat "\n\nWhere do you want AssignZ to be installed?"
  39. ))
  40.  
  41. (set #Help-AssignZ
  42. (cat "Usually it is most reasonable to install AssignZ in the"
  43.      "WBStartup drawer of your system partition"
  44. ))
  45.  
  46. (set #AskPath-AssignZ
  47. (cat "Select path for AssignZ, please"
  48. ))
  49.  
  50. (set #Ask-AssignZCfg
  51. (cat "\n\nWhere do you want AssignZ to put its config file?"
  52. ))
  53.  
  54. (set #Help-AssignZCfg
  55. (cat "Any drawer which can be reached when AssignZ is started."
  56.      "Common paths are SYS:WBStartup, S: or SYS:Storage"
  57. ))
  58.  
  59. (set #With-AssignZ
  60. (cat "With AssignZ"
  61. ))
  62.  
  63. (set #Ask-AssignZCfgPath
  64. (cat "Select a path for AssignZ's config file, please"
  65. ))
  66.  
  67. (set #Rename-AssignZCfg
  68. (cat "Renaming old AssignZ.config"
  69. ))
  70.  
  71. ;icons
  72. (set #Ask-NiceIcons
  73. (cat "\n\nDo you want the nice 16 color icon for AssignZ?"
  74. ))
  75.  
  76. (set #Help-NiceIcons
  77. (cat "Do you want to get the icon for Workbenches with 16 colors and more or do you want the simple one with four colors?"
  78. ))
  79.  
  80. (set #Ask-ReplaceIcon
  81. (cat "\n\nDo you want to replace the existing icon?"
  82. ))
  83.  
  84. (set #Help-ReplaceIcon
  85. (cat "If you select YES, the old icon and the therein contained configuration will be replaced by an icon with default configuration."
  86. ))
  87.  
  88. ;actions
  89. (set #Installing
  90. (cat "Installing"
  91. ))
  92.  
  93. (set #WorkOn
  94. (cat "Working on icon for"
  95. ))
  96.  
  97. (set #EmptyCfg
  98. (cat "Creating empty config file for"
  99. ))
  100.  
  101. (set #Complete
  102. (cat "\n\n\nInstallation complete"
  103. ))
  104.  
  105. ; languages
  106. (set #Ask-Languages
  107. (cat "Which languages except English should be installed?"
  108. ))
  109.  
  110. (set #Help-Languages
  111. (cat "English is the builtin language. The other language(s) are available through locale catalogs which are optionally (need locale.library)"
  112. ))
  113.  
  114. (set #Lang-German
  115. (cat "German"
  116. ))
  117.  
  118. (set #InstCat
  119. (cat "Installing catalog file: "
  120. ))
  121.  
  122. (set #Ask-AssignZCatalogs
  123. (cat "\n\nWhere do you want AssignZ to put its catalog file(s)?"
  124. ))
  125.  
  126. (set #Help-AssignZCatalogs
  127. (cat "The catalogs for locale.library can be either stored in the same directory as AssignZ or in 'LOCALE:'"
  128. ))
  129.  
  130. (set #Locale
  131. (cat "In 'LOCALE:'"
  132. ))
  133.  
  134. )) ; english strings
  135.  
  136. ;=============================================================================
  137. ; German strings
  138.  
  139. (if (= @language "deutsch")
  140. (
  141.  
  142. (set #Bad-Kick
  143. (cat "\n\nSie benötigen KickStart 2.04 oder höher für AssignZ!"
  144. ))
  145.  
  146. (set #Message
  147. (cat "\n\nWillkommen zu AssignZ! \nSie erhalten jetzt die Gelegenheit,\n"
  148.      "Ihr System um ein leistungsfähiges Programm für die komfortablere Bedienung ihres Amigas zu erweitern."
  149. ))
  150.  
  151. (set #Path-Manually
  152. (cat "Pfad manuell wählen"
  153. ))
  154.  
  155. (set #Yes
  156. (cat "Ja"
  157. ))
  158.  
  159. (set #No
  160. (cat "Nein"
  161. ))
  162.  
  163. ; AssignZ
  164. (set #Ask-AssignZ
  165. (cat "\n\nWo soll AssignZ installiert werden?"
  166. ))
  167.  
  168. (set #Help-AssignZ
  169. (cat "In der Regel ist es am sinnvollsten, AssignZ in der "
  170.      "WBStartup-Schublade der Systempartition zu installieren"
  171. ))
  172.  
  173. (set #AskPath-AssignZ
  174. (cat "Wählen Sie bitte das Zielverzeichnis für AssignZ"
  175. ))
  176.  
  177. (set #Ask-AssignZCfg
  178. (cat "\n\nWo soll AssignZ seine Konfigurationsdaten ablegen?"
  179. ))
  180.  
  181. (set #Help-AssignZCfg
  182. (cat "Irgeindeine Schublade, die beim Start von AssignZ erreichbar"
  183.      "ist. Gängige Schubladen wären zum Beispiel SYS:WBStartup, S: oder SYS:Storage"
  184. ))
  185.  
  186. (set #With-AssignZ
  187. (cat "Zu AssignZ"
  188. ))
  189.  
  190. (set #Ask-AssignZCfgPath
  191. (cat "Wählen Sie bitte das Zielverzeichnis für AssignZ's Konfigurationsdatei"
  192. ))
  193.  
  194. (set #Rename-AssignZCfg
  195. (cat "Benenne alte Konfigurationsdatei um"
  196. ))
  197.  
  198. ;icons
  199. (set #Ask-NiceIcons
  200. (cat "\n\nWollen Sie das nette 16-farbige Icon zu AssignZ?"
  201. ))
  202.  
  203. (set #Help-NiceIcons
  204. (cat "Wenn Sie die Workbench mit mindestens 16 Farben und der Amberpalette"
  205.      "und gegebenenfalls PatchPens benutzen, empfehle ich Ihnen, mit 'JA' zu antworten..."
  206. ))
  207.  
  208. (set #Ask-ReplaceIcon
  209. (cat "\n\nWollen Sie das bereits existierende Icon ersetzen?"
  210. ))
  211.  
  212. (set #Help-ReplaceIcon
  213. (cat "Wenn Sie JA wählen, wird das alte Icon und die darin enthaltenen Konfigurationsdaten durch ein neues Icon ersetzt!"
  214. ))
  215.  
  216. ;actions
  217. (set #Installing
  218. (cat "Installiere"
  219. ))
  220.  
  221. (set #WorkOn
  222. (cat "Bearbeite Icon von"
  223. ))
  224.  
  225. (set #EmptyCfg
  226. (cat "Erstelle eine leere Konfigurationsdatei für"
  227. ))
  228.  
  229. (set #Complete
  230. (cat "\n\n\nInstallation beendet"
  231. ))
  232.  
  233. ; languages
  234. (set #Ask-Languages
  235. (cat "Welche Sprachen außer Englisch sollen noch installiert werden?"
  236. ))
  237.  
  238. (set #Help-Languages
  239. (cat "Intern ist AssignZ mit englischen Texten ausgestattet. Die andere(n) Sprache(n) sind über zusätzliche Dateien realisiert (benötigt locale.library)"
  240. ))
  241.  
  242. (set #Lang-German
  243. (cat "Deutsch"
  244. ))
  245.  
  246. (set #InstCat
  247. (cat "Installiere Catalogdatei: "
  248. ))
  249.  
  250. (set #Ask-AssignZCatalogs
  251. (cat "Wählen Sie bitte das Zielverzeichnis für AssignZ's Sprachdatei(en)"
  252. ))
  253.  
  254. (set #Help-AssignZCatalogs
  255. (cat "Es ist möglich, diese Dateien entweder im gleichen Verzeichnis wie AssignZ oder in 'LOCALE:' abzulegen."
  256. ))
  257.  
  258. (set #Locale
  259. (cat "'LOCALE:'"
  260. ))
  261.  
  262. )) ; german strings
  263.  
  264.  
  265.  
  266. ;=============================================================================
  267. ;               install ...
  268. ;=============================================================================
  269.  
  270. (complete 0)
  271.  
  272. (if (< (getversion) (* 37 65536))
  273.     (abort #Bad-Kick)
  274. )
  275.  
  276. (set olduserlevel @user-level)
  277. (user 2)
  278. (message #Message)
  279. (user olduserlevel)
  280.  
  281. (if (askbool (prompt #Ask-AssignZ)
  282.              (help #Help-AssignZ)
  283.              (choices "SYS:WBStartup" #Path-Manually)
  284.    )
  285.    (set AssignZPath "SYS:WBStartup")
  286.    (set AssignZPath 
  287.       (askdir (prompt #AskPath-AssignZ)
  288.               (help #Help-AssignZ)
  289.               (default "SYS:WBStartup")
  290.       )
  291.    )
  292. )
  293. (complete 10)
  294.  
  295. (if (askbool (prompt #Ask-AssignZCfg)
  296.              (help #Help-AssignZCfg)
  297.              (choices #With-AssignZ #Path-Manually)
  298.     )
  299.     (set AssignZCfgPath AssignZPath)
  300.     (set AssignZCfgPath 
  301.        (askdir (prompt #Ask-AssignZCfgPath)
  302.                (help #Help-AssignZCfg)
  303.                (default AssignZPath)
  304.        )
  305.     )
  306. )
  307. (complete 20)
  308.  
  309. (if (= (exists (tackon AssignZCfgPath "AssignZ.config")) 1)
  310.     (set AssignZCfg 0)
  311.     (set AssignZCfg 1)
  312. )
  313. (complete 30)
  314.  
  315. (if (> (getversion "libs:locale.library") (* 38 65536))
  316.    (
  317.       (set languages (askoptions (prompt  #Ask-Languages)
  318.                                  (help    #Help-Languages)
  319.                                  (choices #Lang-German)
  320.                                  (default languages)
  321.                      )
  322.       )
  323.       (if (askbool (prompt #Ask-AssignZCatalogs)
  324.                    (help #Help-AssignZCatalogs)
  325.                    (choices #With-AssignZ #Locale)
  326.          )
  327.          (set LocalePath AssignZPath)
  328.          (set LocalePath "LOCALE:")
  329.       )
  330.    )
  331.    (set languages 0)
  332. )
  333. (complete 40)
  334.  
  335. (if (exists (tackon AssignZPath "AssignZ.info") (noreq))
  336.     (set copyicon
  337.         (askbool (prompt #Ask-ReplaceIcon)
  338.                  (help #Help-ReplaceIcon)
  339.                  (choices #Yes #No)
  340.         )
  341.     )
  342.     (set copyicon 1)
  343. )
  344. (complete 50)
  345.  
  346. (if copyicon
  347.    (set niceicons
  348.       (askbool (prompt #Ask-NiceIcons)
  349.                (help #Help-NiceIcons)
  350.                (choices #Yes #No)
  351.                (default 0)
  352.       )
  353.    )
  354. )
  355. (complete 60)
  356.  
  357. (copyfiles
  358.    (prompt #Installing " AssignZ")
  359.    (source #AssignZName)
  360.    (dest AssignZPath)
  361.    (files)
  362.    (optional force askuser)
  363. )
  364. (complete 70)
  365.  
  366. (if copyicon
  367.    (copyfiles
  368.       (if niceicons
  369.           (source "icons/AssignZ16.info")
  370.           (source "icons/AssignZ4.info")
  371.       )
  372.       (newname "AssignZ.info")
  373.       (dest AssignZPath)
  374.       (files)
  375.    )
  376. )
  377. (tooltype
  378.    (prompt #WorkOn " AssignZ")
  379.    (dest (tackon AssignZPath "AssignZ"))
  380.    (settooltype "CONFIGNAME"  (tackon AssignZCfgPath "AssignZ.config"))
  381.    (settooltype "CX_PRIORITY" "0")
  382.    (settooltype "CX_POPKEY"   "lcommand z")
  383.    (settooltype "CX_POPUP"    "NO")
  384.    (settooltype "STARTPRI"    "-127")
  385.    (settooltype "DONOTWAIT"   "")
  386.    (setstack 8000)
  387.    (noposition)
  388. )
  389. (complete 80)
  390.  
  391. (if AssignZCfg
  392.    (textfile (prompt #EmptyCfg " AssignZ")
  393.              (dest (tackon AssignZCfgPath "AssignZ.config"))
  394.              (append "# $VER: AssignZ.config V1.0 written by AssignZ V2.7\n# AssignZ configuration file\n#\n")
  395.    )
  396. )
  397. (complete 90)
  398.  
  399. (if languages
  400.    (
  401.       (if (= (exists "LOCALE:catalogs/deutsch/AssignZ.catalog") 1)
  402.           (delete "LOCALE:catalogs/deutsch/AssignZ.catalog")
  403.       )
  404.       (if (= (exists (tackon AssignZPath "catalogs/deutsch/AssignZ.catalog")) 1)
  405.           (delete (tackon AssignZPath "catalogs/deutsch/AssignZ.catalog"))
  406.       )
  407.       (
  408.          (if (= (exists (tackon LocalePath "catalogs")) 0)
  409.              (makedir (tackon LocalePath "catalogs"))
  410.          )
  411.          (if (BITAND languages 1) ; deutsch
  412.             (
  413.                (if (= (exists (tackon LocalePath "catalogs/deutsch")) 0)
  414.                    (makedir (tackon LocalePath "catalogs/deutsch"))
  415.                )
  416.                (copyfiles
  417.                   (prompt #InstCat #Lang-German)
  418.                   (source "catalogs/deutsch/AssignZ.catalog")
  419.                   (dest (tackon LocalePath "catalogs/deutsch"))
  420.                   (files)
  421.                   (optional force askuser)
  422.                )
  423.             )
  424.          )
  425.       )
  426.    )
  427. )
  428. (complete 100)
  429.  
  430. (user 2)
  431. (message #Complete)
  432. (exit (quiet))
  433.